<template>
  <ChatMessageTime :data="data"></ChatMessageTime>
  <div class="common-message">{{ dataMessage.messageContent }}</div>
</template>

<script setup>
import ChatMessageTime from "./ChatMessageTime.vue";
import { computed } from "vue";

const props = defineProps({
  data: {
    type: Object,
    default: {},
  },
});

const dataMessage = computed(() => {
  const data = { ...props.data };
  if (data.messageType == "add") {
    data.messageContent = "已经添加为好友，以下是打招呼的信息";
  }
  return data;
});
</script>

<style lang="scss" scoped>
.common-message {
  text-align: center;
  font-size: 12px;
  color: #999999;
  margin-bottom: 20px;
}
</style>
